
<%@ page import="com.walkingfiles.registry.Transfer" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'transfer.label', default: 'Transfer')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<div id="outer">
		<g:render template="/layouts/menu"/>
		<a href="#show-transfer" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div id="show-transfer" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list transfer">

				<li class="fieldcontain">
					<span id="sourceArea-label" class="property-label"><g:message code="transfer.number.label" default="Number" /></span>
					
						<span class="property-value" aria-labelledby="sourceArea-label">${transferInstance?.id}</span>
					
				</li>


				<li class="fieldcontain">
					<span id="sourceArea-label" class="property-label"><g:message code="transfer.sourceArea.label" default="Source Area" /></span>
					
						<span class="property-value" aria-labelledby="sourceArea-label">${transferInstance?.sourceArea?.name.encodeAsHTML()}</span>
					
				</li>

				<li class="fieldcontain">
					<span id="destinationArea-label" class="property-label"><g:message code="transfer.destinationArea.label" default="Destination Area" /></span>
					
						<span class="property-value" aria-labelledby="destinationArea-label">${transferInstance?.destinationArea?.name.encodeAsHTML()}</span>
					
				</li>

				<li class="fieldcontain">
					<span id="sendDate-label" class="property-label"><g:message code="transfer.sendDate.label" default="Send Date" /></span>
					
						<span class="property-value" aria-labelledby="sendDate-label"><g:formatDate date="${transferInstance?.sendDate}" /></span>
					
				</li>


				<li class="fieldcontain">
					<span id="destinationArea-label" class="property-label"><g:message code="transfer.sendUser.label" default="Usuario de envío" /></span>
					
						<span class="property-value" aria-labelledby="destinationArea-label">${transferInstance?.sendUser?.username.encodeAsHTML()}</span>
					
				</li>

				<li class="fieldcontain">
					<span id="destinationArea-label" class="property-label"><g:message code="transfer.subject.label" default="Subject" /></span>
					
						<span class="property-value" aria-labelledby="destinationArea-label">${transferInstance?.subject?.name.encodeAsHTML()}</span>
					
				</li>

											
				<g:if test="${transferInstance?.transferDocuments}">
				<li class="fieldcontain">
					<span id="transferDocuments-label" class="property-label"><g:message code="transfer.transferDocuments.label" default="Transfer Documents" /></span>
					
						<g:each in="${transferInstance.transferDocuments}" var="t">
						<span class="property-value" aria-labelledby="transferDocuments-label"><g:link controller="document" action="show" id="${t.document.id}">${t?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>

				<g:if test="${transferInstance?.sendComment?.comment}">
				<li class="fieldcontain">
					<span id="comments-label" class="property-label"><g:message code="transfer.sendComment.label" default="Comment" /></span>
					
						<span class="property-value" aria-labelledby="comment-label"><g:fieldValue bean="${transferInstance}" field="sendComment.comment"/></span>
					
				</li>
				</g:if>


				<g:if test="${transferInstance?.receptionDate}">
				<li class="fieldcontain">
					<span id="receptionDate-label" class="property-label"><g:message code="transfer.receptionDate.label" default="Reception Date" /></span>
					
						<span class="property-value" aria-labelledby="receptionDate-label"><g:formatDate date="${transferInstance?.receptionDate}" /></span>
					
				</li>
				</g:if>


				<g:if test="${transferInstance?.receptionDate}">
				<li class="fieldcontain">
					<span id="receptionDate-label" class="property-label"><g:message code="transfer.receptionUser.label" default="Usuario de recepción" /></span>
					
					<span class="property-value" aria-labelledby="destinationArea-label">${transferInstance?.receptionUser?.username.encodeAsHTML()}</span>					
				</li>
				</g:if>


				<g:if test="${transferInstance?.receptionComment?.comment}">
				<li class="fieldcontain">
					<span id="comments-label" class="property-label"><g:message code="transfer.receptionComment.label" default="Comentario de recepción" /></span>
					
						<span class="property-value" aria-labelledby="comment-label"><g:fieldValue bean="${transferInstance}" field="receptionComment.comment"/></span>
					
				</li>
				</g:if>

			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${transferInstance?.id}" />
					<g:if test="${session.currentAreaId == transferInstance.destinationArea.id && transferInstance.receptionDate == null}">
						<g:link class="edit" action="receive" id="${transferInstance?.id}"><g:message code="default.button.receive.label" default="Receive" /></g:link>
					</g:if>
				</fieldset>
			</g:form>
		</div>
	</div>
	</body>
</html>
